(mouse-sel-get-selection-function):
authorJohn Paul Wallington <jpw@pobox.com>
Fri, 25 Jul 2003 12:18:46 +0000 (12:18 +0000)
committerJohn Paul Wallington <jpw@pobox.com>
Fri, 25 Jul 2003 12:18:46 +0000 (12:18 +0000)
Check `x-last-selected-text-primary'.  Don't barf if it or
`x-last-selected-text' aren't bound.

lisp/mouse-sel.el

index bba41a0dbf9aca6d7d72057b348581d1cdc0c611..bbbb1e54595a05823eda338bc41f3b8743985f5a 100644 (file)
@@ -313,7 +313,9 @@ unless `mouse-sel-default-bindings' is `interprogram-cut-paste'.")
 (defvar mouse-sel-get-selection-function
   (lambda (selection)
     (if (eq selection 'PRIMARY)
-       (or (x-cut-buffer-or-selection-value) x-last-selected-text)
+       (or (x-cut-buffer-or-selection-value)
+           (bound-and-true-p x-last-selected-text)
+           (bound-and-true-p x-last-selected-text-primary))
       (x-get-selection selection)))
   "Function to call to get the selection.
 Called with one argument: